{include file="public/header"/}
		<div class="wrapper">
			<div class="mod-toolbar-top cf">
				<div class="fl"><strong class="tit">结算账户</strong>
					<!-- <div class="tab-item-other" id="openUrl" >账号管理</div> -->
				</div>
				<div class="fr">
					<a href="#" class="ui-btn ui-btn-sp mrb ui-btn-add" id="btn-add" onclick="lopen('add.html','新增', '710px', '450px')">新增</a>
					<!--<a class="ui-btn mrb" id="btn-disable">禁用</a><a class="ui-btn mrb" id="btn-enable">启用</a>-->
					<!--<a class="ui-btn mrb" id="btn-print">打印</a>-->
					<!--<a class="ui-btn mrb" id="btn-import">导入</a>-->
					<!--<a class="ui-btn mrb" id="btn-export">导出</a>-->
					<a class="ui-btn" id="btn-refresh" onclick="reload();">刷新</a>
				</div>
			</div>
			<div class="grid-wrap">
				<table id="grid">
				</table>
				<div id="page"></div>
			</div>


<script type="text/javascript">
    
    //$(function(){
	$(document).ready(function () {
    	//alert("1111");
    	$("#grid").jqGrid({
	    	url:'/admin/account/index.html?ajax=100',
	        datatype: "json",//数据来源，本地数据（local，json,jsonp,xml等）
	        height:'90%',//高度，表格高度。可为数值、百分比或'auto'
	        //width: Public.setGrid().w,
	        //height: Public.setGrid().h,
	        colNames: ["操作", "账户编号", "账户名称", "当前余额", "期初余额", "建账日期", "账户类别","是否默认"],
	        colModel:[
	            {name:'id',index:'id', width:70, formatter: cLink}, 
	            {name:'sn', width:150},
	            {name:'name',index:'name asc', width:350},
	            {name:'end_money',index:'end_money asc', width:100, align:'right'},
	            {name:'start_money',index:'start_money asc',width:100, align:'right'},
	            {name:'addtime',index:'addtime asc',width:150, align:'center'},
	            {name:'type',index:'type asc',width:100, align:'center'},
	            {name:'',width:100, align:'center'},
	       	],
	        rowNum:10,
	       	rowList:[10,20,30],
	        sortname: 'id',
	     	sortorder: "desc",
	     	pagerpos:"left",//分页位置
	     	
	     	pgbuttons:true,//翻页按钮
	     	pagination:true,
	     	altRows: !0,
	        gridview: !0,
	        shrinkToFit: !1,
	        cellLayout: 8,
	        autowidth: !0,
	        pager: "#page",
	        viewrecords: !0,
	        cmTemplate: {
	            sortable: !1,
	            title: !1
	        },
		    loadError: function(t, e, i) {
			    parent.Public.tips({
			        type: 1,
			        content: "操作失败了哦，请检查您的网络链接！"
			    })
			}
   		});

		function cLink(cellvalue, options, rowObject){
		    return '<div class="operating"><span class="ui-icon ui-icon-pencil" onclick="lopen(\'edit.html?id='+rowObject.id+'\',\'编辑\',\'710px\',\'450px\')" title="修改"></span><span class="ui-icon ui-icon-trash" onclick="del('+rowObject.id+')" title="删除"></span></div>'
		}
	});
    
</script>
 

{include file="public/footer"/}
		
